package ae.pcfc.etks.online.common.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * AttachmentType entity. @author Mohtisham.Salahria
 */
@Entity
@Table(name = "T_ETKS_ATTACHMENT_TYPE", schema = "ETKS_ONLINE_DBA")
public class AttachmentType implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String attachmentTypeCode;
	private String attachmentTypeDesc;
	private String attachmentTypeDescA;
	private String attachmentTypeStatus;
	private String attachmentTypeUser;
	private Set<ProcStepAthmnt> ProcStepAthmnts = new HashSet<ProcStepAthmnt>(
			0);

	// Constructors

	/** default constructor */
	public AttachmentType() {
	}

	/** full constructor */
	public AttachmentType(String attachmentTypeDesc,
			String attachmentTypeDescA, String attachmentTypeStatus,
			Set<ProcStepAthmnt> ProcStepAthmnts) {
		this.attachmentTypeDesc = attachmentTypeDesc;
		this.attachmentTypeDescA = attachmentTypeDescA;
		this.attachmentTypeStatus = attachmentTypeStatus;
		this.ProcStepAthmnts = ProcStepAthmnts;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ATTACHMENT_TYPE_CODE", unique = true, nullable = false, length = 10)
	public String getAttachmentTypeCode() {
		return this.attachmentTypeCode;
	}

	public void setAttachmentTypeCode(String attachmentTypeCode) {
		this.attachmentTypeCode = attachmentTypeCode;
	}

	@Column(name = "ATTACHMENT_TYPE_DESC", length = 80)
	public String getAttachmentTypeDesc() {
		return this.attachmentTypeDesc;
	}

	public void setAttachmentTypeDesc(String attachmentTypeDesc) {
		this.attachmentTypeDesc = attachmentTypeDesc;
	}

	@Column(name = "ATTACHMENT_TYPE_DESC_A", length = 80)
	public String getAttachmentTypeDescA() {
		return this.attachmentTypeDescA;
	}

	public void setAttachmentTypeDescA(String attachmentTypeDescA) {
		this.attachmentTypeDescA = attachmentTypeDescA;
	}

	@Column(name = "ATTACHMENT_TYPE_STATUS", length = 4)
	public String getAttachmentTypeStatus() {
		return this.attachmentTypeStatus;
	}

	public void setAttachmentTypeStatus(String attachmentTypeStatus) {
		this.attachmentTypeStatus = attachmentTypeStatus;
	}
	
	@Column(name = "ATTACHMENT_TYPE_USER", length = 10)
	public String getAttachmentTypeUser() {
		return attachmentTypeUser;
	}

	/**
	 * @param attachmentTypeUser the attachmentTypeUser to set
	 */
	public void setAttachmentTypeUser(String attachmentTypeUser) {
		this.attachmentTypeUser = attachmentTypeUser;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "attachmentType")
	public Set<ProcStepAthmnt> getProcStepAthmnts() {
		return this.ProcStepAthmnts;
	}

	public void setProcStepAthmnts(
			Set<ProcStepAthmnt> ProcStepAthmnts) {
		this.ProcStepAthmnts = ProcStepAthmnts;
	}

}